import request from "./request.js"
import appUrl from "./request.js"

//banner获取
export function banner(data){
 return request({
    url: "/index/index/getBannerByCity",
    method: "post",
    data
  })
 
}
//getCate联动分类名
export function getCate(data) {
  return request({
    url: "/index/index/getCate",
    method: "post",
    data
  })
}
//getCate联动分类名二级
export function getCateII(data) {
  return request({
    url: "/index/index/index",
    method: "post",
    data
  })
}
//攻略接口
export function lookAttack(data) {
  return request({
    url: "/index/index/look_attack",
    method: "post",
    data
  })
}

export function getAttackK(data) {
  return request({
    url: "/index/attack/getAttack",
    method: "post",
    data
  })
}
//登陆
export function login(data) {
  return request({
    url: "/index/login/login",
    method: "post",
    data
  })
}
//点击立即购买  跳入购物车页面请求的接口
export function lookMember(data) {
  return request({
    url: "/index/order/lookMemberPrice",
    method: "post",
    data
  })
} 
//下单接口
export function order(data) {
  return request({
    url: "/index/order/addOrder",
    method: "post",
    data
  })
}

export function judgeMember(data) {
  return request({
    url: "/index/personal/reTurnIsMember",
    method: "post",
    data
  })
}

//商家验证
export function checkBussiness(data) {
  return request({
    url: "/index/personal/checkShop",
    method: "post",
    data
  })
}
//code验证
export function checkCode(data) {
  return request({
    url: "/index/personal/checkCode",
    method: "post",
    data
  })
}
//商家发布活动
export function businessPublish(data) {
  return request({
    url: "/index/personal/getAttack",
    method: "post",
    data
  })
}
//确认发布活动 
export function addActivity(data) {
  return request({
    url: "/index/personal/addActive",
    method: "post",
    data
  })
}
//图片上传
export function upPics(data) {
  return request({
    url: "/index/index/uploadFile",
    method: "post",
    data
  })
}
//展示活动
export function getActivity(data) {
  return request({
    url: "/index/personal/getActive",
    method: "post",
    data
  })
}
//删除活动
export function delActivity(data) {
  return request({
    url: "/index/personal/delActive",
    method: "post",
    data
  })
}
//我的订单
export function userOrder(data) {
  return request({
    url: "/index/personal/getUserOrder",
    method: "post",
    data
  })
}
//商家查看订单
export function businessOrder(data) {
  return request({
    url: "/index/personal/getShopOrder",
    method: "post",
    data
  })
}



//首页点击商家头像
export function getBusiness(data) {
  return request({
    url: "/index/index/getActiveByShop",
    method: "post",
    data
  })
}

//可能喜欢
export function maybeLike(data) {
  return request({
    url: "/index/personal/personLike",
    method: "post",
    data
  })
}
//添加评论
export function addDiscuss(data) {
  return request({
    url: "/index/comment/add",
    method: "post",
    data
  })
}

//评论列表
export function discussList(data) {
  return request({
    url: "/index/comment/look",
    method: "post",
    data
  })
}

//评论回复
export function discussReplay(data) {
  return request({
    url: "/index/comment/replay",
    method: "post",
    data
  })
}

//查看回复
export function searchReplay(data) {
  return request({
    url: "/index/comment/lookByOrderID",
    method: "post",
    data
  })
}

//会员支付
export function payMember(data) {
  return request({
    url: "/index/order/payMember",
    method: "post",
    data
  })
}

//删除订单
export function deleteOrder(data) {
  return request({
    url: "/index/personal/delUserOrder",
    method: "post",
    data
  })
}
//支付订单
export function parForOrder(data) {
  return request({
    url: "/index/order/payOrder",
    method: "post",
    data
  })
}

//商家核销订单
export function checkOrder(data) {
  return request({
    url: "/index/personal/checkOrder",
    method: "post",
    data
  })
}
//添加核销管理员
export function addCancelMember(data) {
  return request({
    url: "/index/personal/addCancelMember",
    method: "post",
    data
  })
}
//查看核销管理员
export function lookCancelMember(data) {
  return request({
    url: "/index/personal/lookCancelMember",
    method: "post",
    data
  })
}
//删除核销管理员
export function delCancelMember(data) {
  return request({
    url: "/index/personal/delCancelMember",
    method: "post",
    data
  })
}